﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAO;
using DTO;
using System.Data;

namespace BUS
{
    public class ThietBiDienBUS
    {
        public static DataTable DanhSach(string sql)
        {
            return ThietBiDienDAO.DanhSach(sql);
        }

        //code tư vấn------------------
        public static DataTable Retrieve_Pin(float CongSuat, int LoaiPin)
        {
            return ThietBiDienDAO.Retrieve_Pin(CongSuat, LoaiPin);
        }

        public static DataTable Retrive_Acquy(int MaLoaiAcquy)
        {
            return ThietBiDienDAO.Retrive_Acquy(MaLoaiAcquy);
        }

        //lấy acquy đc chọn ra để tính toán số lượng, thành tiền
        public static DataTable Retrieve_ThietBi(int MaThietBi)
        {
            return ThietBiDienDAO.Retrieve_ThietBi(MaThietBi);
        }

        //lấy bộ sạc phù hợp V theo loại và A theo pin
        public static DataTable Retrieve_BoSac(int loai)
        {
            return ThietBiDienDAO.Retrieve_BoSac(loai);
        }

        //lấy bộ kích điện có W phù hợp
        public static DataTable Retrieve_BoKichDien(int loai, float congsuat)
        {
            return ThietBiDienDAO.Retrieve_BoKichDien(loai, congsuat);
        }
        //-----------------------------

        public static DataTable LayDanhSachPIN()
        {
            return ThietBiDienDAO.LayDanhSachPIN();
        }

        public static DataTable LayDanhSachBOKICHDIEN()
        {
            return ThietBiDienDAO.LayDanhSachBOKICHDIEN();
        }

        public static DataTable LayDanhSachBOSAC()
        {
            return ThietBiDienDAO.LayDanhSachSAC();
        }

        public static DataTable LayDanhSachACQUY()
        {
            return ThietBiDienDAO.LayDanhSachACQUY();
        }

        public static int ThemThietBiPIN(ThietBiDienDTO _tbd)
        {
            return ThietBiDienDAO.ThemThietBiPIN(_tbd);
        }

        public static int ThemThietBiACQUY(ThietBiDienDTO _tbd)
        {
            return ThietBiDienDAO.ThemThietBiACQUY(_tbd);
        }

        public static int ThemThietBiBOKICHDIEN(ThietBiDienDTO _tbd)
        {
            return ThietBiDienDAO.ThemThietBiBOKICHDIEN(_tbd);
        }

        public static int ThemThietBiBOSAC(ThietBiDienDTO _tbd)
        {
            return ThietBiDienDAO.ThemThietBiBOSAC(_tbd);
        }

        public static int KiemTraTBDT(string temp)
        {
            return ThietBiDienDAO.KiemTraTBDT(temp);
        }

        public static int CapNhatTBPIN(ThietBiDienDTO temp)
        {
            return ThietBiDienDAO.CapNhatTBPIN(temp);
        }

        public static int CapNhatTBACQUY(ThietBiDienDTO temp)
        {
            return ThietBiDienDAO.CapNhatTBACQUY(temp);
        }

        public static int CapNhatTBBOKICHDIEN(ThietBiDienDTO temp)
        {
            return ThietBiDienDAO.CapNhatTBBOKICHDIEN(temp);
        }

        public static int CapNhatTBBOSAC(ThietBiDienDTO temp)
        {
            return ThietBiDienDAO.CapNhatTBBOSAC(temp);
        }

        public static DataTable TraCuuThietBiDien(ThietBiDienDTO _ThietBiDien, int _MaThietBi)
        {
            return ThietBiDienDAO.TraCuuThietBiDien(_ThietBiDien, _MaThietBi);
        }
    }
}
